#ifndef CLIENT_H
#define CLIENT_H

#include <QObject>
#include <QStringBuilder>
#include <QStringList>
#include <QFile>
#include <QByteArray>
#include <QList>
#include <connection.h>

class Client : public QObject
{
    Q_OBJECT
    Q_PROPERTY(Connection* connection READ connection)
    Q_ENUMS(FileState)

public:

    enum FileState { Exist, Busy, NotExist, Error };

    explicit Client(Connection *connection, QObject *parent);
    Client(const Client& client);
    ~Client();

    bool getFile(const QString filename, const QString destinationFilename, FileState &filestate);
    bool getList(QStringList &list);
    bool freeFile(const QString filename);
    bool send(const QString command);

    Connection *connection() const;

signals:
    
public slots:

protected slots:
    void on_connection_connected();
    void on_connection_disconnecting();

private:
    Connection* _connection;
    
};

#endif // CLIENT_H
